package samples
{
	import flash.events.MouseEvent;
	import marcel.core.Plugin;
	import marcel.display.screen.FullScreenManager;
	import marcel.display.View;
	import marcel.display.gui.buttons.SimpleTextButton;
	
	
	public class FullScreenManagerSample extends View
	{
		protected var _fullScreenManager:FullScreenManager;
		
		public function FullScreenManagerSample() {
			super();
			_initFSM();
			_initView();
		}
		
		protected function _initFSM():void {
			_fullScreenManager = new FullScreenManager(Plugin.plugin.stage);
		}
		
		protected function _initView():void {
			var _button:SimpleTextButton = new SimpleTextButton("toggle fullscreen");
			_button.addEventListener(MouseEvent.CLICK, _onClick);
			_button.setPos(100,100);
			addChild(_button);
		}
		
		protected function _onClick(e:MouseEvent = null):void {
			_fullScreenManager.toggle();
		}
	}
}